<?php
/**
 *+------------------
 * Lflow
 *+------------------
 * Copyright (c) 2023~2030 gitee.com/liu_guan_qing All rights reserved.
 *+------------------
 * Author: Mr.April(405784684@qq.com)
 *+------------------
 */
declare (strict_types=1);

namespace lflow\assignment\ipml;

use lflow\assignment\Assignment;
use lflow\helper\AssertHelper;
use lflow\model\TaskModel;
use lflow\workflow\Execution;

/**
 * 申请人处理
 *
 * @author Mr.April
 * @since  1.0
 */
class Proposer extends Assignment
{

    public function assign(TaskModel $model, Execution $execution): string
    {
        $order = $execution->getOrder();
        AssertHelper::notNull($order, '【异常实例不存在或被删除】');
        $assing = $order->getCreator();
        AssertHelper::notNull($assing, '用户不存在或已离职]');
        return $assing;
    }
}